package com.chen.fegin;

import com.chen.config.auth.OAuth2FeignConfig;
import com.chen.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @Author: chen
 * @Date: 2021/4/29 2:46 PM
 * @Version 1.0
 */
@FeignClient(value = "member-server",
        configuration = OAuth2FeignConfig.class,
        path = "/users")
public interface UserFegin {

    /**
     * 根据ids获取用户的信息
     *
     * @param ids
     * @return
     */
    @GetMapping("/getUserByIds")
    Map<Long, UserDto> getUser(@RequestParam(value = "ids",required = false) List<Long> ids,
                               @RequestParam(value = "userName",required = false) String userName,
                               @RequestParam(value = "mobile",required = false) String mobile,
                               @RequestParam(value = "page",required = false) Long page,
                               @RequestParam(value = "size",required = false) Long size);

}

